/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package strategies;

import wrappers.CountryWrap;

/**
 *
 * @author KAV
 */
public class CountriesEditRowStrategy extends EditRowStrategy {

    @Override
    protected void editRow() {
        isValid =pp.getParam("edit_title").matches("[a-zA-Zа-яА-Я 0-9-]+"); 
    }

    @Override
    protected Object createObject() {
        return new CountryWrap(Integer.parseInt(pp.getParam("edit_id")), pp.getParam("edit_title"));
    }
}
